package com.example.test;

import view.TestTabImageView;
import view.TestTabImageView.OnTabImageViewListener;
import android.os.Bundle;
import android.app.Activity;
import android.view.View;

public class MainActivity extends Activity implements OnTabImageViewListener {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
    }

    private void init() {
		///////////////////////////////////////////////
		// main tab menu 컨트롤 리소스 설정 및 리스너 등록 
		///////////////////////////////////////////////
		int[] arrBitmap = null;
		arrBitmap = new int[] {R.drawable.m_bar01, R.drawable.m_bar02, R.drawable.m_bar03, R.drawable.m_bar04, R.drawable.m_bar06};
		
		View[] arView = null;
		
		arView = new View[] {
			findViewById(R.id.txtTab1),
			findViewById(R.id.txtTab2),
			findViewById(R.id.txtTab3),
			findViewById(R.id.txtTab4),
			findViewById(R.id.txtTab5)
		};
		
		// TabControl Setting
		TestTabImageView testTabImage = (TestTabImageView)findViewById(R.id.mainTab);
		testTabImage.SetImageArray(arrBitmap, arView, true);
		testTabImage.setOnTabImageViewListener(this);
    }

	public void onTabImageViewClick(TestTabImageView obj, int nid) {
		// TODO Auto-generated method stub
		
	}
}
